Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new DNS provider integration for Regfish DNS so Acmebot can create/delete TXT records for DNS-01 challenges via the Regfish API.
Changes:
- Introduce
RegfishProviderimplementation with an internalRegfishClientfor zone/record operations. - Add
RegfishOptionsand expose it viaAcmebotOptions. - Register the new provider in
Program.csDNS provider setup.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Acmebot.App/Providers/RegfishProvider.cs | Implements Regfish DNS provider + HTTP client wrapper for zones/records |
| src/Acmebot.App/Program.cs | Registers RegfishProvider when Acmebot:Regfish options are configured |
| src/Acmebot.App/Options/RegfishOptions.cs | Adds options model for Regfish API key |
| src/Acmebot.App/Options/AcmebotOptions.cs | Exposes Regfish configuration slot on main options |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| private static string GetAbsoluteRecordName(string zoneName, string relativeRecordName) => $"{relativeRecordName}.{zoneName}."; | ||
|
|
There was a problem hiding this comment.
IsMatchingTxtRecord contains a special-case for records whose API name is "@" (zone apex), but GetAbsoluteRecordName always formats ${relativeRecordName}.${zoneName}. so it will never pass recordName == zoneName (and will produce values like "@.example.com." / ".example.com." instead). This makes apex matching inconsistent and would prevent DeleteTxtRecordAsync from removing apex TXT records if relativeRecordName is "@" or empty. Consider handling "@"/empty explicitly in GetAbsoluteRecordName (and/or adjusting IsMatchingTxtRecord) so the representation is consistent.
| private static string GetAbsoluteRecordName(string zoneName, string relativeRecordName) => $"{relativeRecordName}.{zoneName}."; | |
| private static string GetAbsoluteRecordName(string zoneName, string relativeRecordName) | |
| { | |
| var normalizedZoneName = NormalizeName(zoneName); | |
| if (string.IsNullOrWhiteSpace(relativeRecordName) || string.Equals(relativeRecordName.Trim(), "@", StringComparison.Ordinal)) | |
| { | |
| return $"{normalizedZoneName}."; | |
| } | |
| var normalizedRelativeRecordName = NormalizeName(relativeRecordName); | |
| return $"{normalizedRelativeRecordName}.{normalizedZoneName}."; | |
| } |
Summary
Added provider for Regfish DNS
Validation
dotnet build -c Release ./srcdotnet format --verify-no-changes --verbosity detailed --no-restore ./src